#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

int main() {
    int a[4];
    scanf("%d %d %d %d", &a[0], &a[1], &a[2], &a[3]);
    double n = a[0] * 0.2 + a[1] * 0.1 + a[2] * 0.2 + a[3] * 0.5;
    printf("%.1f", n);
    return 0;
}